﻿<%if not in_sdcms then response.write("template load fail"):response.end() end if%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="{sdcms[seokey]}" />
<meta name="Description" content="{sdcms[seodesc]}" />
<title>{sdcms[webname]} - powered by sdcms</title>
<link href="{webroot}lib/css/base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/public.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user_base.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user.css" rel="stylesheet" type="text/css" />
<link href="{webroot}theme/default/css/user_publish.css" rel="stylesheet" type="text/css" />
<link href="{webroot}lib/ueditor/themes/default/ueditor.css" rel="stylesheet" type="text/css" />
<script>var webroot="{webroot}";</script>
<script>window.UEDITOR_HOME_URL="{webroot}";</script>
<script src="{webroot}lib/js/jquery.js"></script>
<script src="{webroot}lib/js/jquery-migrate-1.1.0.min.js"></script>
<script src="{webroot}lib/tips/jquery.tips.js"></script>
<script src="{webroot}lib/js/base.js"></script>
<script src="{webroot}lib/js/mobile.js"></script>
<script src="{webroot}lib/validator/jquery.validator.js"></script>
<script src="{webroot}lib/validator/zh_CN.js"></script>
<script src="{webroot}theme/default/js/sdcms.js"></script>
<script>$(function(){$("#user_menu_08").addClass("hover");})</script>
{if sdcms.user_publish_num>0 or id<>0}
<script>
var editor_cid="{id}";
var editor_classid="1";
var editor_upload_root="{webroot}user/";
var editor_adminid="{userid}";
var editor_loginbase="{loginbase}";
</script>
<script src="{webroot}lib/ueditor/editor_user_config.js"></script>
<script src="{webroot}lib/ueditor/editor.js"></script>
<script>
$(function(){UE.getEditor('t1',editorOption_user);});
</script>
{/if}
</head>
<body>
    {sdcms:include("../../sdcms_head.asp")}
    
    <div id="position">您所在的位置：<a href="{webroot}">首页</a> > <a href="./">会员中心</a></div>
    <div class="w980 mt10 mc">
        {sdcms:include("../../user/sdcms_menu.asp")}
        <div class="right_big">
            <div class="b">
                <div class="subject">在线投稿</div>
                <div class="p12">
                
                        <div class="publishstep">
                            <ul>
                                <li class="step1"><span class="active"><span><span>1.选择栏目</span></span></span></li>
                                <li class="step2"><span class="active"><span><span>2.在线投稿</span></span></span></li>
                                <li class="step3"><span><span><span>3.投稿结果</span></span></span></li>
                            </ul>
                        </div>
                        <div class="publish">
                            {if sdcms.user_publish_num<0 and id=0}
                                您所在的用户组禁止投稿
                            {elseif sdcms.user_publish_num=0 and id=0}
                                您今日的投稿数量已用完
                            {else}
                            <form class="formname" method="post">
                            <ul>
                                <li><span class="text">当前栏目：</span>{catename}{if id=0}　<span class="c9"><a href="publish.asp?act=add">重选</a></span>{/if}</li>
                                <li><span class="text">文章标题：</span><input type="text" name="t0" size="50" maxlength="255" class="ip" value="{title}" data-rule="标题:required;" /></li>
                                <li><span class="text">文章内容：</span><div style="float:left"><textarea name="t1" id="t1" style="width:590px;" >{content}</textarea></div></li>
                                <li><span class="text">验证码：</span><input type="text" name="t2" size="6" maxlength="4" class="ip"  data-rule="验证码:required;" /> <img src="{webroot}lib/imgcode.asp?t0=80&t1=20" title="看不清楚？点击刷新！" align="absmiddle" id="imgcode" onClick="this.src+='&'+Math.random();" /><span for="t2" class="msg-box"></span></li>
                                <li><span class="text"></span><input type="submit" value="提交" class="bnt_blue" /> <input type="button" value="返回" class="bnt_blue" onclick="location.href='javascript:history.go(-1)'" /></li>
                            </ul>
                            </form>
                            {/if}
                        </div>
                        <div class="c"></div>
                </div>
            </div>
        </div>
    </div>
    <script>
	$(".formname").validator(
		{
			stopOnError:true,
			theme:'yellow_right',
			ignore:':hidden',
			beforeSubmit:function(){$("input[type='submit']").attr("disabled",true);},
			valid:function(form)
			{
				$("#t1").val(UE.getEditor('t1').getContent());
				$.fn.tips({type:'loading',content:'数据提交中'});
				$.ajax(
				{
					url:"?act=db&classid={classid}&id={id}",
					type:"post",
					data:$(form).serialize(),
					success:function(data){
						data=jQuery.parseJSON(data);
						var type="warn";
						if(data.status=="y"){type="ok";}
						$.fn.tips({type:type,content:data.info});
						if(data.status=="y"){setTimeout('location.href="publish.asp"',1000);}
						else
						{$("input[type='submit']").attr("disabled",false);}
						
					}
				});
			},
			invalid:function(){$("input[type='submit']").attr("disabled",false);}
		}
	);
	</script>
    {sdcms:include("../../sdcms_foot.asp")}